// Admin 专用 API 封装（从 api.js 复制，便于解耦）

// export const admin_home = (data = {}, config = {
// 	custom: { auth: false }
// }) => uni.$u.http.post('/home/getHomeInfo', data, config);

export const clearVouch = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/clearAllVouch', data, config);

export const updateNewsStatus = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/updateNewStatus', data, config);

export const deleteNews = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/deleteNews', data, config);

export const updateNotice = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/notice/update', data, config);

export const addNotice = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/notice/add', data, config);

export const getNoticeDetail = (id, config = {
	custom: { auth: false }
}) => uni.$u.http.get(`/notice/${id}`, { ...config });

export const vTouchItem = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/vTouch', data, config);

export const setTopItem = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/top', data, config);

export const getAminTeacherInfo = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/getTeacherInfo', data, config);

export const updateTeacherStatus = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/updateTeacherStatus', data, config);

export const updateTeacherInfo = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/teacher/update', data, config);

export const addTeacher = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/teacher/add', data, config);

export const getUserDetail = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/user/detail', data, config);

export const updateUserStatus = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/user/updateStatus', data, config);

export const deleteUser = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/user/delete', data, config);

export const cleanUpUserLog = (data = {}, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/userLog/cleanup', data, config);

export const getSetupContent = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/appConfig/getByKey', data, config);

export const updateSetupContent = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/appConfig/update', data, config);

export const addSetupContent = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/appConfig/create', data, config);

export const getWorkDaySet = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/dayset', data, config);

export const exportUser = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/user/export', data, config);

export const delDownLoad = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/delDownLoad', data, config);

export const delFile = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/file/del', data, config);

export const exportJoinData = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/exportDaySet', data, config);

export const delTeacher = (data, config = {
	custom: { auth: false }
}) => uni.$u.http.post('/admin/delTeacher', data, config);
